
const inventors = [
    { first:'Alert',last:'Einstein',year:1979},
    { first:'Isaac',last:'Newton',year:1643},
    { first:'Galileo',last:'Galilei',year:1564},
    { first:'Marie',last:'Curie',year:1867},
    { first:'Johannes',last:'Kapler',year:1571},
    { first:'Nicolaus',last:'Copernicus',year:1473},
    { first:'Max',last:'Planck',year:1858}
    
]

const getPeople = function*(peoples) {
    for( let people of peoples) {
        yield people;
    }
}


const peoplesGen = getPeople(inventors);
console.log( peoplesGen.next());
